<link href="/theme/Admin/css/control/index.css" rel="stylesheet">
<script src="/theme/Default/js/jquery.validate.js"></script>
<script src="/theme/Admin/js/BannerManage/indexValidate.js"></script>

<form action="/admin/BannerManage/edit/<?php echo $data['Banner']['id'];?>" method="post" id="bannerAdd" enctype="multipart/form-data">
	<input type="hidden" id="data_imgOld" name="data[imagOld]" value="<?php echo $data['Banner']['img'];?>" />
	<div id="admin-control">
		<div class="admin_control_header">
			Thêm danh mục <span class="admin_control_notice">(Vui lòng điền đầy đủ thông tin)</span>
		</div>
		<div class="admin_control_row">
			<div class="admin_control_label">
				Danh mục :
			</div>
			<div class="admin_control_element">
				<div class="element-main">
					<select class="form-control" data-size="8" name="data[category_id]" id="data_category_id">
						<option value="0">Chọn danh mục</option>
					    <?php
						    foreach ($cat as $item){?>
								<option value="<?php echo $item['Category']['category_id']?>"
									<?php echo $data['Banner']['category_id'] == $item['Category']['category_id']?'selected':''?>
									><?php echo $item['Category']['category_name']?></option>
						    
						<?php } ?>
				  	</select>
				</div>
				<div class="category_group_warntip hide"> <!-- Them class "hide" thi se mat di-->
					<div class="warntip_triangle">&nbsp;</div>
					<div class="warntip_content">
						<span>Bạn chưa chọn danh mục</span>
			    	</div>
				</div>
			</div>
		</div>
		
		<div class="admin_control_row">
			<div class="admin_control_label">
				Hình :
			</div>
			<div class="admin_control_element">
				<div class="element-main">
					<input placeholder="chọn hình ảnh" class="form-control" id="data_img" name="data[img]" type="file"/>
				</div>
				<div class="category_group_warntip" style="display: none;">
					<div class="warntip_triangle">&nbsp;</div>
					<div class="warntip_content">
						<span>Vui lòng chọn tập tin hình ảnh</span>
			    	</div>
				</div>
			</div>
		</div>
		
		<div class="admin_control_row">
			<div class="admin_control_label">
				Địa chỉ web :
			</div>
			<div class="admin_control_element">
				<div class="element-main">
					<input placeholder="Địa chỉ trang web" class="form-control" id="data_url" name="data[url]" type="text" id="data_url" 
					value="<?php echo $data['Banner']['url'];?>"
					/>
				</div>
				<div class="category_group_warntip" style="display: none;">
					<div class="warntip_triangle">&nbsp;</div>
					<div class="warntip_content">
						<span>Vui lòng điền đúng tên trang web</span>
			    	</div>
				</div>
			</div>
		</div>
			
		<div class="admin_control_row">
			<div class="admin_control_label">
			</div>
			<div class="admin_control_element">
				<div class="element-main">
					<button type="submit" class="btn btn-danger">Thêm</button>
				</div>
			</div>
		</div>
		<div>
			
		</div>
	</div>
</form>